home *** CD-ROM | disk | FTP | other *** search
Gui4CLI script | 1999-12-03 | 1.3 KB | 56 lines |
- G4C
-
- ; An example of the use of the GuiRename command to launch
- ; the same gui many times.
- ; =============================================================
-
- xOnLoad
-
- ; we set up a counter, and construct 10 little windows..
- c = 1
- while $c <= 10
- ; load the temporary file which we create below, passing
- ; a new number to the xOnLoad command of that file.
- guiload ram:temp.gc MyGui. $c
- ++c
- endwhile
-
- delete ram:temp.gc ; be tidy..
- guiquit #this
-
-
- ; -------------------------------------------------------------
- ; Crete a gui file in ram, called temp.gc
- ; This gui will load itself and GuiRename itself into MyGui.xx
- ; where xx is the number we pass
- ; -------------------------------------------------------------
-
- TextFile ram:temp.gc ; This command creates a file
- G4C
-
- WinBig -1 -1 150 60 ""
-
- xOnLoad basename winnum ; we pass the base name & the number
-
- appvar basename $winnum ; construct the new name (eg MyGui.1)
- guirename #this $basename ; rename the gui..
-
- ; just for show, give the windows random positions...
- changearg #this 0 0 $$Rand.500
- changearg #this 0 1 $$Rand.250
-
- ; and a unique title
- setwintitle #this 'Window: $winnum'
-
- guiopen #this ; finally, open it..
-
- xOnClose
- guiquit #this
-
- ### ; This signifies the end of file
-
-
-
-
-
-